Some fixes to js for dashboard