Bug fix for initializing filedata