Fixes error in listing api client keys

Using if meant the first key was always at fault. Not helpful