multiple procedures bug fixed