more fixes on tests (backported updates from 4.4 for test compatibility)