Fixed mainfile resolve