fixes #668