Rectangle bug fixed