fixes for Tim's changes