When you are checking if there is an intersection between targb and targrb, you are setting targmright to true, and targmleft to false. I believe you want to do the opposite.
I have not tested this, but I believe that might be the cause of the problem.
Edit: I assumed that the Boolean values were declared prior to a loop, and the movement checking is happening within the loop. However, I am uncertain if that is the case here.