fixing minor bugs and improving .net embedded integration