Fixes issues where the gem would crash in the testing environment