fix whitespaces and form resubmission problem