fixed String to Integer conversion bug