Fixed controller function undefined error.