some fixes, fix warning/notices