Improve custom properties detection