minor fixes, adding null check and text fixes