fix a couple of residual bugs from the coffeescript conversion