fix the end_sb() bug. TODO: implement the end_sb()