Fixed #598