PMO-2437: more type safety