Fixing import branch code logic