Fix 2.11 compiler warnings

Partial fix for #109.
I fixed the first two compiler warnings. The tests I added seemed to indicate that they are cases that are being caught, its just the compiler can't quite figure it out. 
I don't think we can fix the last warning without #86, because its a deprecation warning for the JSON library.