Resetting document after submit