More little bug fixes