(hopefully) fixed dashboard code