fixing bug