Fixing a bug in the form and adding style in case of error