Fixed a new null pointer exceptions when clicking on canvas before selecting program.