Fix css comments breaking and loosing characters

Fixes #466
Fixes #506