Fix bug in clearing a transformed canvas