Error reporting and some 1.8.7 ~> 2.x fixes