traces added and bugfix