Fix stat bug