I think the problem is that you blindly set the output to 0 when the switch is pressed. I think you want the logic to be something like this
Code:
IF left button is pressed
IF left limit switch is pressed
output = 0
ELSE
output = MOVE_LEFT_SPEED
You'll need something similar on the right side as well