fix keyval broken parsing