Bug fixes for getFrameClosest and getFrameSearch