Fixed tons of NullPointerExceptions