Fix some warning and improve performance