fix negative number bug