Fix prepare.call and account for window.