fixed bugs in handler and renderer

Signed-off-by: Dietrich Wittenberg <dietrich.wittenberg@online.de>