[PLAT-4823] Better fix to initialize classes properly