fix to Tim's problems