Add multiple patch fixing compilation warning and obvius code bug. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>