Fixed #135, thanks to @ohpe for suggestion