Fixed a few input bugs resulting in nonexisting values