Fixed #506