Fixed enum call so that it will work in other enviroments. Also put in a small safeguard in the map interpreter