Fixed small function error