Remove invalid characters