* fix some potential NULL-dereferences