Fixing wrong function call