Hopefully fix multiple NullPointerExceptions