all bugs in decoder fixed