fixed typo and added alert