Some small functionality fixes