(Possible) bug fix; improved some docs and error messages