Istvan's fixes