fixed function for deleting content in input