Fix conditional bug