bugfixes, removed disabled code