Implemented clearing of canvas when proferences are updated.