fix type switch on submission