Make activate script more compatible