bug fixes - F matrix andother small ones