fixed a bug in adding form