Fixed error with continuity correction and added more tests