Fixed bug in required inputs