Fixed refresh code.