fixed bug in select profiling