Fixing some decoding stuff