Fix bug with incorrect name of function