Fixes error in checkingObjectInMap