Fix addition of negative numbers

Also fix a bug in toUlong