some cleanup to make it convert successfully