fixed broken procedure