fixed behaviour when variable is not defined