add check for state.decoder