Some cleanup, thanks to @kaosdynamics (fix #238)