Added check for variables #3236