DOC/BLD: fix annoying sphinx bugs

closes #3721.