Fix of code logic.