Bugfix + Optimization