Added rectangular object check