fixes for Courier, thanks to ugexe on GitHub