Fixed a stability issue with rspec specs