build fix and tests