Fix some notice/warning