fixed reading in frames