fixed bug in printing NULL array