remove invalid characters