fixes POST request not triggering until next ()