fix problems with number conversion