Minor functional fixes