Bug Fix: Avoid NPE.
Bug Fix: Avoid NPE.