misc schema bug fixes