Fixed infinite loop on underscore script registration