Ported to portable version