Fixed issue from migrating to jQuery