fixes bug in pre/code parsing