Some perf improvement.
Fix here and there