Added handler for user-defined functions.