extracting the branch check was actually a bad idea (read: does not work)