Removed unneeded element reference in hide function