fixes #553, fixes #575