Add resultCode handling.