null exception fix updated