fixing tests which fail on some environments