fixed failing tests on 1.8.7 ruby