Fixed #591