fixed two blunders when open-sourcing this..
good start? who knows