Fixed issue 135.
Applied patch from Atsushi Saito.