fixing missing directory problem