fix part of bugs