tweaking null pointer exceps