fixed bug in set_z, needed type() when making rotation angle.