Fixes for binary export