comprehensive bugfixes in ex