Fixed #540