Additional fix for activerecord model