fix negative number bugs