Fixing bug about wrong context