fix manifest reading code