Backwards compatibility with 1.8.7 plus a couple misc. fixes