Bug fixes all around