Merge fixes from devel branch