Fix warnings

Cast object and fully specify protocol name.