fix uninit variable causing crash on 0 value