fix stat permission returning more info than 777