fix keyerror issue (#88)