Bug Fix: Avoid NullPointerExecptions.