initial bug fixes