fixes #1227