Fixed #133, thanks to @ohpe for reporting