Fixed a notice warning when creating new post