Fixes for binary detection