fix bug portability test + minor changes