fix up bug