Fix #292 - Added checks to avoid misinterpretation of ne and sw corners.