Fix some nil errors and require LFS if needed.