Fix the Memory Underflow bug due to the use of negative numbers with
size_t