test for ticket 256 and small bugfixes
add tests related to ticket 469

updated test