Fix for following wrong branch of execution