Fixed bug with having input and output