fixes to compile on 5.3