fixing 'ctx not defined' bug

replify as referring to non-existing `ctx` which caused crash whenever I passed extra context besides app.