Fixed error when overriding jquery methods.