Merged these two if-statements