Fixed #507