minor tweaks, should work better now