try 5 ... corrected a missing var for img in canvas service