bugfix: several minor notices and warnings have been fixed