Fixing warning when no post id is set