Improved corner handling

Fields around the corner are now taken into consideration