added error on invalid post id