update to latest upstream + fixes

 fixes posted here:
 http://marc.info/?l=openbsd-tech&m=139989763016557&w=2
 http://marc.info/?l=openbsd-tech&m=139986537207882&w=2