Resolved problem using regions