fixes for 7ce81b798b95eab857b582a2ea51053fcb0a4ae2