Fixed some compatibility issues with pry