fixes #216, fixes #215

Signed-off-by: Werner Macho <werner.macho@gmail.com>