JavaScript closure,fix #5