Fixes issues with markdown rendering

Fixes #1818