Fixes to jQuery code in play