Improve #418 by trimming keyword provided