fix dashboard logic