Scratch that, it was working, but now the laser stays on when it shouldn't.
I'm too tired to work out why at the moment though.