Remove unnecessary ifs in dashboard