Added test for api client user check, which found an error. Fixed error.