fixes for unittesting