fix a missing include and a couple of warnings.