fix on registering js