fixed path indexes when callback returns undefined