Fixed encoding bug
Added decode command