Fixes sub condition order issue