solved bugs for setting Nexts