Resolve js warnings about unaccessible variables