merge in some development fixes

oops, been committing in my fork and here! Better merge the two...