more attempts at fixing bug