Fix bug in tmp.
Fix #4. Fix #12.