Fix dimensions bug in check logic