[Micro-opt] Fixed #13 possible infinite loop