api.c fix MSG overlap