Fixed undefined function error in server.