bug fixes, some improvements, profiler enabled