Bug fix. Performance Optimizations.