Fix error in refresh element