fixed a few crash causes in gui and module code
Signed-off-by: Franz Sattler <sattler@ad.dkfz-heidelberg.de>