Fixed #581