Minor improvements for testing