Fix: set the correct num elements on parsing error