Fixed error with registering js.