added and fixed canvas usage