Fixed a bug that allows user to add same keyword
error handling improvements