many fixes for FRAM compatibility