Fixing dex memory limitations