Fixed bug returning NULL from void method