Fixes #2253, array contains null elements