Fix Null Pointer Exception #389