fixing rectangle class