Fix invalid post handling