Fixes #15 with a warning check