Added sindex_frame and removed some bugs