fix application-mode key parsing