bug 1391: corrected value check