Fixing file indexing issues

This works! :smile: