Fixed conditional in remove method