fixed API version check