add missing assertions
fix decoder