Minor perf improvement
Fix bug