Fixed null pointer on save.