Minor bugfix, added documentation