fix some style, add a install method check