Various fixes

Fix for issues:
https://ortussolutions.atlassian.net/browse/COMMANDBOX-87
https://ortussolutions.atlassian.net/browse/COMMANDBOX-86
https://ortussolutions.atlassian.net/browse/COMMANDBOX-90