A couple of minor things

I found these two things around and fixed on-the-fly. ;)

I'm not 100% sure about the last one...as you know js is not my preferred language... :P
If it is wrong, let me know I'll revert the commit.