Some minor improvements/fixes