Fixed ruby issues