Bug fixing and profiling