improve edit posts with bug #19 and #20