fix bug for postapi.php