fex bugfixes on master