Made directory map work correctly