Cannot read property 'toFixed' of undefined