Verbessertes detectRect()