fix problem with remove tree folders in sql