tail light making me crazy

i had a simular issue.i added a ground wire to the housing to a good ground.worked ever since