fixed flow problem when date.df is empty
fixed scope error in panel expander