Updated activate script for osx compatability