Fixes possible memory leak for Keyboard notifications