Minor changes to be compatible with Rails 4

Change-Id: I57348d12e05afd60353b748aa8ed44acc40f1806