fix == null / 0 error