Fixed a bug with getFrame