Added check to prevent wex being created each call