Fix getIP and other bugs, 4 samples testing is okay