Fixed critical bug in data input