Proposed fix for gh#264

This patch should fix issues outlined in issue #264 https://github.com/opdemand/deis/issues/264