Null exception fixed