Fixed the isdeleted issue