BUG: Check input array lengths after missing data handling.