Removed Ruby warnings

Fixed some code that was raising Ruby warnings.