fix ruby conversion error