fixed up bug