That was my code originally, I was just being braindead. Should hav ebeen -1 (though 999 works fine in this case).