fixed issues with flash messages for post creation/update