Fixed canvas drawing bug.