Fixing invalid function call