Dashboard error on function inside empty