bugfixes

discovered some bugs while rebuilding at Dallas.rb