conditional error fixed