bugfix for legacy code