bugfixes for plan import