fix max num elements confusion