Fixes possible memory leak for Keyboaurd notifications