fix "Scope of a procedure is not explicitly declared"