fixing bug with context identification