Minor changes to be compatible with Rails 4

Change-Id: Ic56dc5f5cd2062e9d16fb5172a4673171813b48b