fixed: wrong condition logic