use if-statement.
Merge pull request #48 from wakameci/remove-unnecessary-unmap-procedure

use if-statement.