minor bugfixes; removed debug output