Possibly fix null value exception