Bug fix
Performance improvements