Fixed issues with empty sidebars and recode of other functions.