Fixed getVariables() method incompatibility.
Namespaced variables fixing method slightly modified.