Fixed error in function return size