Trying to fix the deploy issues

Ivan, can you take a look at this when you have some time.  This seems to fix the problems I've had locally.