Fix bug in NewVariableFragment