Fix bug with splitting of streams based on deviceId