Fix incorrect value used in comparison

Signed-off-by: Bartosz Tomczyk <bartekplus@gmail.com>