fix somed bugs