Fixed errors with dynamic paths