Added to set maximum to the source X and Y