Fix for negative resists
Still don't understanding merging