fixed rails instance issues