Add limitation on number of temporary keys and error messages in the frontend