Various issue fixes