Changed keyword parsing algorithm

to fix issue #156 and # 181