[master] Some biug fixies