fixed a rare bug