update to make it work in C9.io runtime environment
fixed undef variable