Removes invalid