added corner types check