Fix error while removing functions.