Bug fixes

Pull Request