Tests adjusted to 16 bit ca imaging datasaving, bugfixes found by unittests