Fixed bug in deleting inputs