Fixed some erros on refines.