more profiling + bugfix