fixed getting codec bug