Delete message error

Hi. I am using HL8548 to develop call and SMS application. When receiving new SMS, the module sends me “+CMTI: “SM”,2” code. After that, i use “AT+CMGR=2” to read the content but HL8548 just respond to me “OK”. Then i delete the message from preferenced memory using “AT+CMGD=2,0” and the module responds “+CMS ERROR: invalid memory index” .
This problem sometimes i got and i don’t know how to fix them. I need your support.
Thanks in advance!