Fix ordering bug