Fixed #355 - Added null check goet getModuleStack()