Fixing wrong func implementation