Fixed variables naming in attachToForm().