build fix and cleanup