Update alert messages and fix a bug.