Fixed minor bug if form DOM didn't exist