Some fixes by PaGrom