Fixed seg fault due to incorrect array initialisation.