Fixed bugs in sphinx docs