Bug-fix & added documentation