tring to fix error loading after clicking submit button