Fix to retrieve record from active record