fix graphic artifacts when rotating