Fixing formatting errors after checking PDF