Fixed bug where input calculations were not correct at start.