Fixed array check bug