tmp bug fix