Corrected button function which was excluded because of missing submit handlers.