why are you setting this to true then to false in the same function call?