Bugfixes

Some bugfixes to get this gem to work with the current state of the API.