Fixed exceptions caused by the Input class.