Fixed errros on refines.