Using explicit bind to avoid problems with multiple IFs