fix origin bugs