fix synchronization on getContext, context was set before it was refreshed