fixes #583