build as release package

and some minor fixes