Proposed fix for gh#264

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