Shabbos 5 – שבת ה

The Gemara (on Amud Alef) states in the name of Rabbi Yochanan that one who throws an item which ends up landing in the hand of his friend is Chayav (even if it was not his intention to land it there).  How does this fit with Rabbi Yochanan’s halacha (on Amud Beis) that the akira needs proper intentions to be considered a melacha (which requires proper intention and ‘meleches machsheves’)?