Changed some string terminations from NULL to \0.