Fixed #522