Fixed out of synch between active record and sql causing customs_type to
not set correctly