Fixed bugs with form not being displayed on proper pages