fixes loads of bugs creating static files