fixes #506