Fixed reference error on form callback