Fix setMaxSize with emoji