fixing stat issues