Use setImmediate after any drawImage() call