[WIP] Fix Null Pointer Exception #389 + TEST

#389