Fixed #433. Reworked client-side form logic