Corrected function removing bug in function editor