latest fixes by slava! please help testing.