Added pixel checking