fix formatting issues when editing