fix bug when getting the context in intent services