Updated to work correctly when run locally.