fix further warnings and newly introduced error