Fixed some warnings and notices.