Two bugs

Two bugs have been fixed.