getActiveShell() sometimes returns null
This commit fixes #434.
Implement support for modules on server. Fixes: #433