removes space at the end of inherit folder