fix rectangle / polygon stuff