made comparison more safe