fixed active_date = nil and deactive_date = nil bug