Fixed issue with minimum and maximum coordinates