fix the issue of wrong format reading