fixing client issue
adding nil check in lua call