Fixed API version check