Fix bench function