fix a non-existent directory bug