a few small fixes to the above