fix copypaste error
fix loop - size_t is unsigned so can not be negative