Errors in javascript

There were JS errors, so the overlays didn't work.
@maethu