Fixed lost of bugs