* bug fixes from Sven-Ola