Fix Warnings

This fixes a compiler warning and a ruby deprecation warning.