Update deref
Fixed tests