Fix expected handling