Fix bug in createPost