Bugfixes lena

This function returns an array. Returning without any value breaks the behaviour of the function.