Credit Andy Hayden for fixing #131