merged fixes from master