Some fixes (still not running though)