Fixed the form so the correct visibility box will be checked