Fix some potential dependency issues