Fixed NPE from ParaPenguin/SporkPGM#29

Just little fix :D