size reduction and fix for tests