fixed/refactored some failing tests
Merge pull request #1997 from mesutcelik/problematic-tests

fixed/refactored some failing tests