removed legacy code which caused issue #978