raise exceptions on warnings during tests - and solve a couple of them