Fix for NullPointerExecption Crash