Bug correction with params passed by ajax