updates for rails 4 compatability