Added an api version check