fix subfolder build bugs