Minimal bug fixes