Couple of minor changes to aid rails 4 compatibility