Fix warnings and building errors in docs