fixed some bugs in parsing and alert template