Fixed javascript return for define