fix bugs enough to start building model
Merge remote-tracking branch 'origin/master'