Fix for rails apps