Javascript update 2, debug 1