fixed negative number bug