Fix a bug in getting Frames