fix power of 2 check for corner selection