Fix bugs.

Fix missing type on posts.
Fix error where post id started at 0, this broke the new parent handling.