Move this if in previous if block