Fix bug with maintaining the user function.