Fixed error

Fixed the problem that was causing it to blow up in Firefox, so now it
works in that browser too