bugfix + removed deprecated code