fixed a bug in textfields