fixed bug in register view.