Fixed #134, thanks to @ohpe for reporting