corrected some more errors that cropped up when translating to coffeescript