Fix several problem