added check for onRemove to removePseudos function