fixed the double POST request issue