Hacky fixes to my dissolve script