Fixed calling of functions