Fixing bug problem