Some ruby compat fixes