Fix module upgrade mechanism