Fixed refactor of user functions.