Code fixes

Some code minor fixes