fixes #565