#242| Sandeep | minor refactoring and setting headers to empty array to avoid null pointer exception