bug fixing on deletedAt when where clause is provided