lots of hacks to make gulp play well programmatically