Some tweaks, seems to work fine now.