Fix some findbug reported errors.