Some fixes for latets commit