Fix key filter length bug