fix further mistakes detected by static analyzer
fix copy & paste error