Merge pull request #22 from feedingaliencat/internal_errors

Study of some possible internal errors, with related tests