fix possible bugs