Fix logic
Merge pull request #6 from hiroraba/fix_logic

Fix logic