Fix bug in get_cvar method