medic system + bugfixes