fix firstFrame bug