Fixed a bug and documented another one