Update code to account for testing environment.