bugfixes to mission handling