several fixes + michael changes