Some fixes to frame bugs.