fix for dir=""