Fix bug in setting origin to 0,0.