minor fix to kwd handler