Power law extrapolation bug

Good catch! I have added some tests and fixed a bug in your branch.