some bugfixes in handling static files