Added all the fixes from 2.10.2+

Thanks to @cexikitin for these fixes :D