MEDITE: bug fixes