Fixed differents bugs