Dirty update to PTM to allow use with Rails 4.