Some ruby fixes