Fix NullPointerException on context.