little modify in canvas