Fixed access key check bug