Fixing empty form bug