Minor bugfix and added documentation