Fixes bug caused by key/value mixup