fixing bug in treating form