- fix the issue where preloader is never closed - add a condition to check if required sidebar elements are not null