Fix recently introduced bug in App.create_state