fix an output generated by rails