Fix off/removeListener call

@reinpk @ianstormtaylor