improve cube detection
Merge branch 'master' of https://github.com/appsgate2015/appsgate