Correct issue with classLock unlock order - could deadlock the server

Signed-off-by: Ross Allan <rallanpcl@gmail.com>