Fix initialization in case of mixed path

This quick fix seems to work well with mixed paths and nested objects as well. PR closes issue #24.