corrected a few folder related bugs