js timeout hacks