fix getVariables BUG