Fixed outputting nil errors