Fixes for key compression