try to fix yet another null exception. plus a dirty fix