Add check for wrong variable passing