fixed API bug

yeah, the one that was driving me nuts for months…