Should also check if err exists.