Fix some warnings, fixes #3