Fixing js callings