npe exception fixed.