tiny changes in utils.h(to avoid underflow)