Trying to fix jquery bug