merging local changes, some fixes.