new attempt at fixing bug in clear form