Other minor bug fixes