fixed bug with unchecked variables