parseInt needs 10 as its second parameter to force parsing in base 10.