Bug fixing: forgot to return the final input fields