Fixed a bug reported by vimlesh where the producer would return a wrong frame in a paused state.