tried to change order of key changes but still getting "unknown error", which most likely is actually authentication error (due to old libfreefare not setting errno correctly on authentication erorrs