Some small fixes based on fxcop