some fixes

collection of local patches