not sure if this is a problem but I noticed that when I won against someone 4 stones stronger than me and I only went up a few points, but when I lost twice to someone who is 2 stones weaker I dropped almost two stones. Just wondering what the math is or if it was a mistake.
The math is this (just in case you realy wonder what the math is) + modifications as described in the post @smurph linked.
The short answer is:
OGS calculates ratings in bunches of your up to 15 games. It uses the current rating of your opponents. If the rating of your earlier opponents changed, than these changes would influence the new calculation.
A drop of the rating of some of your earlier opponents could lead to what you described.
Is this your profile: https://online-go.com/player/332198
If yes, then (as far as I can tell) your rating history was calculated as expected.
If you talk about specific games, it would be helpful, if you would provide a link to the games in question.
Sorry for the short explanation. If you need a more detailed explanation, just ask.