Fixed clearRect issue