trim some useless path info