Fix module already exists check