fixes offline bug