Fix forms not emptying themselves when cursor value becomes undefined