fix minor bugs that caused form rendering issues