some fixes & add magos-init