fixed incorrect variable in engine.string.endsWith()