fix procedure select