Fixed regression, added documentation