bug fixes on canvas