Some changes

Uncomment line 219
Now can hold correctly new/edit/schedule post
Optimise SQL query