Fixed bug ctx was missing.