Minior bug and doc fixes