Update gems and fix resulting bugs