Multiple bug fixes.