Change codec so it does not crashed on func