Fix bugs introduced by frame