Small re-arrangements to please coverity and logic.