fix logic var