Fixes to make the gem work