multiple bug fix