conditional bug fix