Bugfix for #730