Fix for Bug#2 and #3

Codefix for post-add.php and post-edit.php