fixed bug printing null result