Correctly flatten classifier inputs as part of two step classification