fixing bugs - procedures, variables_local