Bugfix around filename handling