Array null pointer exception

Fixes broken tests due to null pointer exception.