Fixes for test issues in EAP 5.2 tests

Problems found during testing PL 2.1.5 version in EAP 5.2 ER5.