Fix bugs on empty keywords