parseInt ignores trailing characters, closes #325