Fix negative number bug