bugfix: fix handling of number > 1000