small fixes to 3.5 compatibility